//
//  HMTextField.swift
//  WeiBo
//
//  Created by Apple on 16/9/18.
//  Copyright © 2016年 KY. All rights reserved.
//

import UIKit

//  动态显示修改后的效果
@IBDesignable
class HMTextField: UITextField {

    //  给xib视图增加属性
    @IBInspectable var borderWidth: CGFloat = 0 {
        didSet {
            self.layer.borderWidth = borderWidth
            
        }
    }
    
    //  边框颜色
    @IBInspectable var borderColor: UIColor? {
        didSet {
            self.layer.borderColor = borderColor?.cgColor
        }
    }
    
    //  边角弧度
    @IBInspectable var cornerRadius: CGFloat = 0 {
        didSet {
            self.layer.cornerRadius = cornerRadius
            self.layer.masksToBounds = true
        }
    }
    

}
